package com.yi;

import org.apache.commons.collections.Transformer;

import java.io.Serializable;

public class ConstantTransformer implements Transformer, Serializable {

    public final Object iConstant;

    public ConstantTransformer(Object constantToReturn) {
        this.iConstant = constantToReturn;
    }

    //    transform方法构造
    @Override
    public Object transform(Object o) {
        return this.iConstant;
    }
}
